home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Utilities / AmigaWriter-Filter / UnInstall < prev    next >
Text File  |  2000-10-29  |  3KB  |  80 lines

  1. ; Uninstallation script for AmigaWriter-Filter
  2. ;
  3. ; ©2000 by Rüdiger Hanke
  4.  
  5. (set #FILTERPATH "SoftLogik:Filters")
  6. (set #DOCFILTER (cat #FILTERPATH "/AmigaWriter.dfilter"))
  7. (set #TEXTFILTER (cat #FILTERPATH "/AmigaWriter.tfilter"))
  8.  
  9. (set #DEINSTALL_TFILTER (exists (cat "" #TEXTFILTER) (noreq)))
  10. (set #DEINSTALL_DFILTER (exists (cat "" #DOCFILTER) (noreq)))
  11.  
  12. (set @app-name "AmigaWriter-Filter")
  13. (set @default-dest (cat "" #FILTERSPATH))
  14.  
  15. ; First check some stuff
  16. (if (and (<> 1 #DEINSTALL_TFILTER)
  17.          (<> 1 #DEINSTALL_DFILTER))
  18.    (
  19.       (abort "AmigaWriter-Filter is not installed!\n\nThe installer could not find any installed filter.\n")
  20.    )
  21. )
  22.  
  23. ; Ask what to install if user != novice
  24. (if (<> @user-level 0)
  25.    (
  26.       (set #BITMASK 0)
  27.       (if (<> 0 #DEINSTALL_DFILTER)
  28.          (
  29.             (set #BITMASK (bitor #BITMASK 1))
  30.          )
  31.       )
  32.       (if (<> 0 #DEINSTALL_TFILTER)
  33.          (
  34.             (set #BITMASK (bitor #BITMASK 2))
  35.          )
  36.       )
  37.       (set #RESULT   (askoptions (prompt "Please select which filter(s) you'd like to deinstall:")
  38.                                  (choices "Document filter" "Text filter")
  39.                                  (default #BITMASK)
  40.                                  (help "Select the filters you would like to deinstall.\n\nDocument filter:\n"
  41.                                        "With the document filter, you can load AmigaWriter documents in PageStream "
  42.                                        "via the \"Open\" menu item as if they were PageStream-native documents. Page sizes, boxes, images, "
  43.                                        "links between boxes etc. will all be imported.\n\n"
  44.                                        "Text filter:\nThe text filters imports the main flowtext of your AmigaWriter "
  45.                                        "document via the \"Insert text\" menu item into the current column.\n\n"
  46.                                        "Both filters can co-exist and unless you absolutely don't need one of them, "
  47.                                        "there is no reason to install only one.")))
  48.  
  49.       (if (not (bitand 1 #RESULT))
  50.          (
  51.             (set #DEINSTALL_DFILTER   0)
  52.          )
  53.       )
  54.  
  55.       (if (not (bitand 2 #RESULT))
  56.          (
  57.             (set #DEINSTALL_TFILTER   0)
  58.          )
  59.       )
  60.    )
  61. )
  62.  
  63. ; DeInstall
  64. (if (<> 0 #DEINSTALL_DFILTER)
  65.    (
  66.       ; Delete document filter
  67.       (delete  #DOCFILTER
  68.                (prompt  "Deinstalling document filter..."))
  69.    )
  70. )
  71.  
  72. (if (<> 0 #DEINSTALL_TFILTER)
  73.    (
  74.       ; Delete text filter
  75.       (delete  #TEXTFILTER
  76.                (prompt  "Deinstalling text filter..."))
  77.    )
  78. )
  79.  
  80.